/// @description Insert description here
// You can write your code in this editor
if(room == rTitle) visible = false; else visible = true;
if(global.gamePaused)
{
	keyUp = keyboard_check_pressed(vk_up) || keyboard_check_pressed(ord("W"));
	keyDown = keyboard_check_pressed(vk_down) || keyboard_check_pressed(ord("S"));
	pauseSelect += keyDown - keyUp;
	if(pauseSelect < 0) pauseSelect = array_length(pauseOptions) - 1;
	if(pauseSelect >= array_length(pauseOptions)) pauseSelect = 0;
	
	keyActivate = keyboard_check_pressed(vk_space);
	if(keyActivate)
	{
		switch(pauseSelect)
		{
			case 0 : //continue
			{
				global.gamePaused = false;
				with(all)
				{
					image_speed = gamePausedSpeed;
				}
				break;
			}
			case 1 : //save & quit
			{
				SaveGame();
				game_restart();
				break;
			}
			case 2 : //save & quit to desktop
			{
				SaveGame();
				game_end();
				break;	
			}
			
		}			
	}

}
